"""
家 PO
"""

from models import POBase
from my_typing import *
from utils.data_utils.special import ObjectIdStr
from utils.validator_utils.pydantic_validator.field import (
    CharField,
    DecimalField,
    NormalField,
)


class FamilyHomePO(POBase):
    """ 家 | PO """

    alias: StrOrNone = CharField(None, title="别名", min_length=3, max_length=32)
    area: FloatOrNone = DecimalField(None, title="面积", min_value=10, max_value=1000)
    building: StrOrNone = CharField(None, title="楼幢楼层信息", max_length=32)
    community_name: StrOrNone = CharField(None, title="小区名称", max_length=32)
    description: StrOrNone = CharField(None, title="描述", max_length=256)
    name: str = CharField(..., title="名称", min_length=1, max_length=32)
    region_code: str | None = NormalField(None, title="行政区划编号", description="可以是省、市、区、街道任一级别")
    user_id: ObjectIdStr = NormalField(..., title="用户 ID")
